﻿using System.Windows;
using System.Windows.Controls;
using Tanmia.Basis.Prism;

namespace Tanmia.Basis.View
{
    /// <summary>
    /// Interaction logic for OperationButton.xaml
    /// </summary>
    public partial class OperationButton : Button
    {
        public void SetCommand(UICommand command)
        {
            Command = command;
            lblCaption.Content = command.Caption;
            lblShortCut.Content = command.GestureModifier.ToString() + " + " + command.GestureKey.ToString();
        }

        public void SetBorderThickness(double left, double top, double right, double bottom)
        {
            border.BorderThickness = new Thickness(left, top, right, bottom);
        }

        public void SetCornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)
        {
            border.CornerRadius = new CornerRadius(topLeft, topRight, bottomRight, bottomLeft);
        }

        public OperationButton()
        {
            InitializeComponent();
        }
    }
}
